//
// Created by 王一飞 on 2021/1/3.
//

#ifndef LS_FUNC_H
#define LS_FUNC_H

#include <sys/stat.h>
#include <dirent.h>

#define GREEN(a) "\033[32m" a "\033[0m"
#define SKYBLUD(a) "\033[36m" a "\033[0m"
#define PURPLE(a) "\033[35m" a "\033[0m"


void ls_all_file(char *dirName);
int getFileInfo(char *fileName, struct stat *fileInfo);
void ls_a(DIR *directory_pointer, char *dirName);
void ls_l(DIR *directory_pointer, char *dirName);
int getAllDir(char *dirName, struct dirent *entry, char *allDir);
int accessChange(struct stat *fileInfo, char *accessStr);

#endif //LS_FUNC_H
